Optimal. Leaf size=99 \[ -\frac{a^2 c^5 (3 B+i A) (1-i \tan (e+f x))^6}{6 f}+\frac{2 a^2 c^5 (B+i A) (1-i \tan (e+f x))^5}{5 f}+\frac{a^2 B c^5 (1-i \tan (e+f x))^7}{7 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.167718, antiderivative size = 99, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.049, Rules used = {3588, 77} \[ -\frac{a^2 c^5 (3 B+i A) (1-i \tan (e+f x))^6}{6 f}+\frac{2 a^2 c^5 (B+i A) (1-i \tan (e+f x))^5}{5 f}+\frac{a^2 B c^5 (1-i \tan (e+f x))^7}{7 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 77
Rubi steps
\begin{align*} \int (a+i a \tan (e+f x))^2 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx &=\frac{(a c) \operatorname{Subst}\left (\int (a+i a x) (A+B x) (c-i c x)^4 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (2 a (A-i B) (c-i c x)^4-\frac{a (A-3 i B) (c-i c x)^5}{c}-\frac{i a B (c-i c x)^6}{c^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{2 a^2 (i A+B) c^5 (1-i \tan (e+f x))^5}{5 f}-\frac{a^2 (i A+3 B) c^5 (1-i \tan (e+f x))^6}{6 f}+\frac{a^2 B c^5 (1-i \tan (e+f x))^7}{7 f}\\ \end{align*}
Mathematica [B] time = 9.04328, size = 254, normalized size = 2.57 \[ \frac{a^2 c^5 \sec (e) \sec ^7(e+f x) (35 (3 B-7 i A) \cos (2 e+f x)+35 (3 B-7 i A) \cos (f x)-245 A \sin (2 e+f x)+189 A \sin (2 e+3 f x)-105 A \sin (4 e+3 f x)+98 A \sin (4 e+5 f x)+14 A \sin (6 e+7 f x)-105 i A \cos (2 e+3 f x)-105 i A \cos (4 e+3 f x)+245 A \sin (f x)-105 i B \sin (2 e+f x)+21 i B \sin (2 e+3 f x)-105 i B \sin (4 e+3 f x)+42 i B \sin (4 e+5 f x)+6 i B \sin (6 e+7 f x)+105 B \cos (2 e+3 f x)+105 B \cos (4 e+3 f x)+105 i B \sin (f x))}{840 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 147, normalized size = 1.5 \begin{align*}{\frac{{c}^{5}{a}^{2}}{f} \left ({\frac{i}{7}}B \left ( \tan \left ( fx+e \right ) \right ) ^{7}+{\frac{i}{6}}A \left ( \tan \left ( fx+e \right ) \right ) ^{6}-{\frac{2\,i}{5}}B \left ( \tan \left ( fx+e \right ) \right ) ^{5}-{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{6}}{2}}-{\frac{i}{2}}A \left ( \tan \left ( fx+e \right ) \right ) ^{4}-{\frac{3\,A \left ( \tan \left ( fx+e \right ) \right ) ^{5}}{5}}-iB \left ( \tan \left ( fx+e \right ) \right ) ^{3}-{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{2}}-{\frac{3\,i}{2}}A \left ( \tan \left ( fx+e \right ) \right ) ^{2}-{\frac{2\,A \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.7265, size = 201, normalized size = 2.03 \begin{align*} -\frac{-60 i \, B a^{2} c^{5} \tan \left (f x + e\right )^{7} - 70 \,{\left (i \, A - 3 \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{6} +{\left (252 \, A + 168 i \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{5} - 210 \,{\left (-i \, A - B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{4} +{\left (280 \, A + 420 i \, B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{3} - 210 \,{\left (-3 i \, A + B\right )} a^{2} c^{5} \tan \left (f x + e\right )^{2} - 420 \, A a^{2} c^{5} \tan \left (f x + e\right )}{420 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.2768, size = 441, normalized size = 4.45 \begin{align*} \frac{{\left (1344 i \, A + 1344 \, B\right )} a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (1568 i \, A - 672 \, B\right )} a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (224 i \, A - 96 \, B\right )} a^{2} c^{5}}{105 \,{\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 71.3342, size = 231, normalized size = 2.33 \begin{align*} \frac{\frac{\left (64 i A a^{2} c^{5} + 64 B a^{2} c^{5}\right ) e^{- 10 i e} e^{4 i f x}}{5 f} + \frac{\left (224 i A a^{2} c^{5} - 96 B a^{2} c^{5}\right ) e^{- 12 i e} e^{2 i f x}}{15 f} + \frac{\left (224 i A a^{2} c^{5} - 96 B a^{2} c^{5}\right ) e^{- 14 i e}}{105 f}}{e^{14 i f x} + 7 e^{- 2 i e} e^{12 i f x} + 21 e^{- 4 i e} e^{10 i f x} + 35 e^{- 6 i e} e^{8 i f x} + 35 e^{- 8 i e} e^{6 i f x} + 21 e^{- 10 i e} e^{4 i f x} + 7 e^{- 12 i e} e^{2 i f x} + e^{- 14 i e}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.17806, size = 258, normalized size = 2.61 \begin{align*} \frac{1344 i \, A a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + 1344 \, B a^{2} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + 1568 i \, A a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - 672 \, B a^{2} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} + 224 i \, A a^{2} c^{5} - 96 \, B a^{2} c^{5}}{105 \,{\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]